﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HNCDataSetTableAdapters;
using System.Data;

public partial class UserControl_content_detail_customer : System.Web.UI.UserControl
{
    ProductsTableAdapter pro = new ProductsTableAdapter();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadDetaiProduct();
        }
        
    }

    public void loadDetaiProduct()
    {
        int ProductID = int.Parse(HttpContext.Current.Request.RequestContext.RouteData.Values["ProductID"].ToString());
        DataTable dt = pro.GetProductByProductID(ProductID);
        lblTitle.Text = FuntionHNC.GetLanguage(dt.Rows[0]["Title"].ToString(),dt.Rows[0]["Title_en"].ToString());
        img.Src ="~/UserUploads/Product/"+ dt.Rows[0]["Image"].ToString();
        ltrContent.Text = FuntionHNC.GetLanguage(dt.Rows[0]["Content"].ToString(), dt.Rows[0]["Content_en"].ToString());
    }

}